package com.hgt.cloudAlibaba.controller;

import com.hgt.cloudAlibaba.domain.CommonResult;
import com.hgt.cloudAlibaba.domain.Order;
import com.hgt.cloudAlibaba.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author HuangGaoTao 929507053@qq.com
 * @Created: 2021/7/21 17:27
 */
@RestController
public class OrderController {

    @Autowired
    private OrderService orderService;

    @GetMapping("/order/create")
    public CommonResult create(Order order){
        orderService.create(order);
        return new CommonResult(200,"订单创建成功");
    }
}
